<template>
  <div>
    <pulldown header="公安监所数据">
      <div slot="content">
        <a-descriptions bordered :column="3">
          <a-descriptions-item v-for="(item,index) of  forList" :key="index" :label="item.name" :span="item.span">
            {{ pageData1[item.key] }}
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </pulldown>
    <pulldown header="司法强戒所数据">
      <div slot="content">
        <a-descriptions bordered :column="4">
          <a-descriptions-item v-for="(item,index) of  forList" :key="index" :label="item.name" :span="item.span">
            {{ pageData2[item.key] }}
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </pulldown>
    <!--    {{$filterDictTextByCache('process_approval_type', 1)}}-->
  </div>
</template>

<script>
import pulldown from '../../../modules/pulldown'
import {basicDetail, Families, prisonInformation} from "@api/sjsk/archives";
export default {
  name: "basic",
  components:{ pulldown },
  mounted() {
  },
  data(){
    return   {
      resultData:{},
      innse:true,
      user:{},
      forList:[
        {name:'戒毒所名称',key:'durgRehabilitatioName',val:'2022.07.14',span:3},
        {name:'初次吸毒日期',key:'firstDrugTime',val:'张三'},
        {name:'既往戒毒次数',key:'previousDurgNum',val:'女'},
        {name:'是否复吸',key:'isReAbsorption',val:'2022.07.14'},
        {name:'吸毒方式',key:'nation',val:'61KG',span:2},
        {name:'吸毒类型',key:'sex',val:'171cm'},
        {name:'入所原因',key:'reasonsAdmission',val:'海南海口'},
        {name:'决定机关',key:'decisionOrgan',val:'O型'},
        {name:'入所日期',key:'admissionTime',val:'汉族'},
        {name:'起始日期',key:'enterStartTime',val:'共青团员',span:2},
        {name:'截止日期',key:'enterEndTime',val:'健康'},
        {name:'预计出所日期',key:'estimatedTime',val:'未婚'},
        {name:'出所原因',key:'reasonGoOut',val:'本科'},
        {name:'出所去向',key:'departure',val:'中国医科大学'},
        {name:'实际出所日期',key:'actualDepartureTime',val:'2022.07.14'},
        {name:'接收民警',key:'receivePoliceName',val:'2022.07.14'},
        {name:'民警联系方式',key:'currentPoliceStation',val:'2022.07.14'},
        {name:'接收家属',key:'receiveFamilyName',val:'2022.07.14'},
        {name:'家属联系方式',key:'receiveFamilyPhone',val:'2022.07.14'},
      ],
      pageData1:{},
      pageData2:{},
    }
  },
  methods:{
    refreshTable(){
      prisonInformation({idCard:'46525463442442'}).then(ser => {
        console.log(ser)
        if(ser.success){
          for(let item of ser.result){
            item.data_source === '1' ? this.pageData1 = item : this.pageData2 = item
          }
          console.log(this.pageData1)
          console.log(this.pageData2)
        }
      }).catch(err => {

      })
    },
  }
}
</script>

<style scoped>

</style>